<div class="infoBlock">
<div class="infoBlockHeading"><span class="t">Images</span></div>
<div class="infoBlockContent">

{*
<div class="infoBlockItem">
<form name="itemform" method="post">
<input type="hidden" name="action" value="update">
<input type="hidden" name="id" value="{$CONTENT.item.id}">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td width="100" align="right" valign="top"><label class="fb">Name</label>: </td>
    <td><a href="?op=detail&id={$CONTENT.item.id}" class="underline">{$CONTENT.item.name}</a></td>
    <td></td>
  </tr>
  <tr>
    <td align="right" valign="top"><label class="fb">Model</label>: </td>
    <td>{pp_text name="field_model" value=$CONTENT.item.model class="inputText3" require="true"}</td>
    <td></td>
  </tr>
  <tr>
    <td align="right" valign="top"><label class="fb">Images</label>: </td>
    <td><script type="text/javascript" language="javascript">puploadinit('items');</script></td>
    <td></td>
  </tr>
  <tr>
    <td align="right" valign="top"></td>
    <td><input type="submit" name="submitbtn" value="Submit"></td>
    <td></td>
  </tr>
</table>
</form>
</div>
*}

<div class="infoBlockItem">
<form name="itemform" method="post">
<input type="hidden" name="action" value="addimages">
<input type="hidden" name="id" value="{$CONTENT.item.id}">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td width="100" align="right" valign="top"><label class="fb">Name</label>: </td>
    <td><a href="?op=detail&id={$CONTENT.item.id}" class="underline">{$CONTENT.item.name}</a></td>
    <td></td>
  </tr>
  <tr>
    <td align="right" valign="top"><label class="fb">Model</label>: </td>
    <td>{pp_text name="field_model" value=$CONTENT.item.model class="inputText3" require="true"}</td>
    <td></td>
  </tr>
  <tr>
    <td align="right" valign="top"><label class="fb">Images</label>: </td>
    <td><script type="text/javascript" language="javascript">puploadinit('items');</script></td>
    <td></td>
  </tr>
  <tr>
    <td align="right" valign="top"></td>
    <td><input type="submit" name="submitbtn" value="Submit"></td>
    <td></td>
  </tr>
</table>
</form>
</div>

{literal}
<style type="text/css">
ul.hls {
	width: 100%;
	min-height: 100px !important;
}
ul.hls div.item {
	
}
</style>
{/literal}

<div class="infoBlockItem">
<ul class="hls">
{section name=image loop=$CONTENT.images}
<li>
<div class="item">
<div class="img" id="dimg_{$CONTENT.images[image].id}"><a href="javascript:void(0);" onclick="deleteimage('{$CONTENT.images[image].id}');" title="{$CONTENT.images[image].name}">{pp_pimage src=$CONTENT.images[image].value url=$CONTEXT.URLBASE path_prefix="===CONFIG_DIR_UPLOADS_THUMBS" width=$CONTENT.images[image].width height=$CONTENT.images[image].height lw="100" lh="100" alt=$CONTENT.images[image].name}</a></div>
<div class="name"></div>
<div class="desc"></div>
</div>
</li>
{/section}
</ul>
</div>

{literal}
<script type="text/javascript" language="javascript">
function deleteimage(id) {
	if( confirm("Delete Image?") ) {
		xca('deleteimage', [id,'p']);
	}
}
</script>
{/literal}

</div>
</div>